package behaviorType.mediator;

public class Anchor {
    private boolean free;

    private Mediator med; // 无论是主播还是评论员都要用中介对象，执行动作

    public Anchor(Mediator md) {
        med = md;
    }

    public boolean isFree() {
        return free;
    }

    public void setFree(boolean free) {
        this.free = free;
    }

    // 通过中介者来开始说话
    public void speak() {
        med.anchorSpeak();
    }

    // 通过中介者来停止说话
    public void stop() {
        med.anchorStop();
    }

}